package com.hex.liyue.usermodule.presenter;

import com.hex.liyue.commonmodule.manager.HttpManager;
import com.hex.liyue.commonmodule.manager.UserManager;
import com.hex.liyue.commonmodule.net.ResponseListener;
import com.hex.liyue.giftmodule.bean.GiveGiftsBean;
import com.hex.liyue.giftmodule.presenter.IGiveGiftsView;
import com.hex.liyue.lookingdatemodule.bean.AppointmentDetailsResultBean;
import com.hex.liyue.usermodule.bean.VideoListsBean;


/**
 * Created by $cmm on 2016/6/21.
 * <p/>
 *  礼物列表的业务类
 */
public class VideoListsPresenter {
    private IVideoListsView iVideoListsView;

    public VideoListsPresenter(IVideoListsView iVideoListsView) {
        this.iVideoListsView = iVideoListsView;
    }

    public void getVideoLists() {
        iVideoListsView.showLod("加载中...");
        HttpManager.getInstance().getVideoLists(UserManager.getUserId(),new ResponseListener<VideoListsBean>() {
            @Override
            public void onSuccess(VideoListsBean videoListsBean) {
                iVideoListsView.closeLod();
                iVideoListsView.setAdapter(videoListsBean);
            }

            @Override
            public void onFailure(String responseresult) {
                iVideoListsView.closeLod();
                iVideoListsView.showT(responseresult);
            }
        });
    }
}